package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@RequestMapping("/art")
@Slf4j //获取日志对象
public class AircleController {

    @RequestMapping("/hi")
    public String sayHi(){
        //@Slf4j会自动生成一个log对象
        log.trace("我是Slf4j的trace");
        log.debug("我是Slf4j的debug");
        log.info("我是Slf4j的info");
        log.warn("我是Slf4j的warn");
        log.error("我是Slf4j的error");
        return "hi，Aircle";
    }
}
